package com.cloudfun.campusshare.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @author : zhangyongjie
 * @version : 1.0
 * @createTime : 2020/5/7 19:54
 * @description :
 */
@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "user_rel")
public class UserRelEntity {

    @Id
    @GenericGenerator(name = "id_uuid", strategy = "uuid")
    @GeneratedValue(generator = "id_uuid")
    @Column(name = "id", unique = true, columnDefinition = ("varchar(40) not null comment '主键uuid'"))
    private String id;

    @Column(columnDefinition = ("varchar(40) not null comment '用户Id'"))
    private String userId;

    @Column(columnDefinition = ("varchar(40) not null comment '父账号id'"))
    private String parentId;

    @Column(columnDefinition = ("varchar(40) not null comment '关系所属商户Id'"))
    private String merchantId;
}
